// checkin.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include <iostream>
typedef unsigned char   uint8;
typedef unsigned short   uint16;
typedef unsigned long DWORD_PTR;
#define BYTE  uint8
#define WORD  uint16
#define DWORD unsigned long
#define LOBYTE(w)           ((BYTE)(((DWORD_PTR)(w)) & 0xff))
#define HIBYTE(w)           ((BYTE)((((DWORD_PTR)(w)) >> 8) & 0xff))
#define BYTEn(x, n)   (*((BYTE*)&(x)+n))
#define WORDn(x, n)   (*((WORD*)&(x)+n))
#define BYTE0(x)   BYTEn(x,  0)         // byte 0 (counting from 0)  添加此宏定义
#define BYTE1(x)   BYTEn(x,  1)         // byte 1 (counting from 0)
#define BYTE2(x)   BYTEn(x,  2)
#define BYTE3(x)   BYTEn(x,  3)
#define BYTE4(x)   BYTEn(x,  4)

typedef          long long ll;
typedef unsigned long long ull;
#define __int64 long long
#define __int32 int
#define __int16 short
#define __int8  char
typedef __int64 ll;
typedef unsigned __int64 ull;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned short ushort;
typedef unsigned long ulong;
typedef          char   int8;
typedef   signed char   sint8;
typedef unsigned char   uint8;
typedef          short  int16;
typedef   signed short  sint16;
typedef unsigned short  uint16;
typedef          int    int32;
typedef   signed int    sint32;
typedef unsigned int    uint32;
typedef ll              int64;
typedef ll              sint64;
typedef ull             uint64;


#define _BYTE  uint8
#define _WORD  uint16
#define _DWORD uint32
#define _QWORD uint64

void __cdecl sub_412140()
{
    size_t n; // [esp+610h] [ebp-E2Ch]
    bool v3; // [esp+61Ch] [ebp-E20h]
    size_t m; // [esp+628h] [ebp-E14h]
    int v5; // [esp+640h] [ebp-DFCh]
    int k; // [esp+64Ch] [ebp-DF0h]
    int j; // [esp+658h] [ebp-DE4h]
    int v8; // [esp+670h] [ebp-DCCh]
    int v9; // [esp+670h] [ebp-DCCh]
    int v10; // [esp+67Ch] [ebp-DC0h]
    int v11; // [esp+67Ch] [ebp-DC0h]
    char v12[42]; // [esp+688h] [ebp-DB4h]
    char v13[3]; // [esp+6AFh] [ebp-D8Dh] BYREF
    size_t i; // [esp+6BCh] [ebp-D80h]
    char v15[1009]; // [esp+6C7h] [ebp-D75h]
    char v16[2432]; // [esp+AB8h] [ebp-984h] BYREF

    strcpy(v16, "flechao10");
    v12[0] = -125;
    v12[1] = 27;
    v12[2] = -14;
    v12[3] = 75;
    v12[4] = -81;
    v12[5] = 1;
    v12[6] = 5;
    v12[7] = 35;
    v12[8] = 57;
    v12[9] = 93;
    v12[10] = -94;
    v12[11] = -101;
    v12[12] = -110;
    v12[13] = -15;
    v12[14] = -99;
    v12[15] = -35;
    v12[16] = -35;
    v12[17] = -103;
    v12[18] = -68;
    v12[19] = 119;
    v12[20] = -53;
    v12[21] = 25;
    v12[22] = 114;
    v12[23] = -27;
    v12[24] = 100;
    v12[25] = 47;
    v12[26] = -42;
    v12[27] = 62;
    v12[28] = 15;
    v12[29] = 18;
    v12[30] = 5;
    v12[31] = 108;
    v12[32] = -112;
    v12[33] = 48;
    v12[34] = -73;
    v12[35] = 2;
    v12[36] = -58;
    v12[37] = -48;
    v12[38] = -24;
    v12[39] = 0x23;
    v12[40] = 0x3c;
    v12[41] = 0x23;
    v10 = 0;
    uint8 v20[43];
    for (j = 0; j < 256; ++j)
    {
        *(_DWORD*)&v16[4 * j + 1228] = v16[j % 9];
        *(_DWORD*)&v16[4 * j + 20] = j;
    }
    for (k = 0; k < 256; ++k)
    {
        v10 = (*(_DWORD*)&v16[4 * k + 1228] + *(_DWORD*)&v16[4 * k + 20] + v10) % 256;
        v8 = *(_DWORD*)&v16[4 * k + 20];
        *(_DWORD*)&v16[4 * k + 20] = *(_DWORD*)&v16[4 * v10 + 20];
        *(_DWORD*)&v16[4 * v10 + 20] = v8 ^ 0x37;
    }
    v5 = 0;
    v11 = 0;

    for (m = 0; m < 42; ++m)
    {
        v5 = (v5 + 1) % 256;
        v11 = (*(_DWORD*)&v16[4 * v5 + 20] + v11) % 256;
        v9 = *(_DWORD*)&v16[4 * v5 + 20];
        *(_DWORD*)&v16[4 * v5 + 20] = *(_DWORD*)&v16[4 * v11 + 20];
        *(_DWORD*)&v16[4 * v11 + 20] = v9;
        v20[v5] = v16[4 * ((*(_DWORD*)&v16[4 * v11 + 20] + *(_DWORD*)&v16[4 * v5 + 20]) % 256) + 20];
        //printf("%p", v20);
    }
    for (n = 0; n < 42; ++n) {
        v12[n] = v20[n + 1] ^ v12[n];
        printf("%c", v12[n]);
    }
}
//e5 77 93 2c d4 62 3d 47 0d 39 9a ac ab dc aa bc ed aa 91 43 fb 2c 14 c8 5c 4d e7 0c 22 2b 35 54 a5 51 8e 36 f2 b1 8c 42 58
int main()
{
    sub_412140();
    std::cout << "Hello World!\n";
}

